import React, { useState, useEffect } from 'react';
import axios from 'axios';
import { newestReq } from '../../../../utils/api';

const TopBackLoopImage = () => {
  const [data, setData] = useState([]);

  useEffect(async () => {
    const result = await newestReq()

    setData(result.data.albums);
  }, []);

  return (
    <ul>
      {data.map(item => (
        <li key={item.id}>
          <img src={item.blurPicUrl + '?param=100y100'} alt="blurPicUrl" style={{width: '100px', height: '100px'}}/>
        </li>
      ))}
    </ul>
  );
}

export default TopBackLoopImage;
